#pragma once
#include <highgui.h>


class camRecorder
{
public:

	void run(char* fileName)
	{
		CvCapture* capture = cvCaptureFromAVI("video\\1.avi");
		IplImage* img = 0; 

		char b;
		do{
			img = cvQueryFrame(capture);
			//cvWriteFrame(writer,img);      // add the frame to the file

			cvShowImage("mainWin", img); 
			b = cvWaitKey(20);
		}while (b != 27);

		cvReleaseCapture(&capture);
		
	}
};